package com.tiancheng.trade.settlement.mapper.settlement;

import com.tiancheng.trade.settlement.mapper.TYBaseMapper;
import com.tiancheng.trade.settlement.model.settlement.SettlementBankBillDetail;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface SettlementBankBillDetailMapper extends TYBaseMapper<SettlementBankBillDetail> {
    /**
     * 更新对账状态为已对账
     *
     * @param subOrderKey
     * @return
     */
    int updateStatus(List<String> subOrderKey);

    /**
     * 更新子订单号为空的数据对账状态为已对账
     *
     * @return
     */
    int updateSubOrderIdIsNullStatus();

    /**
     * 更新子订单号为空的数据
     *
     * @return
     */
    int batchUpdateSubOrderId();

    /**
     * 更新子订单号为空的数据
     *
     * @return
     */
    int batchUpdateClearSubOrderId();

    /**
     * 按子订单编号查询银行清分流水信息
     *
     * @param subOrderId
     * @return
     */
    List<SettlementBankBillDetail> selectBankBill(@Param("subOrderId") String subOrderId);

    /**
     * 按子订单编号查询银行清分流水信息
     *
     * @param bankOrderId
     * @return
     */
    List<SettlementBankBillDetail> selectBankBillByBankOrderId(@Param("subOrderId") String bankOrderId);

}
